package com.ninthgroup.service;

import com.ninthgroup.entity.Permission;
import com.ninthgroup.vo.PermissionVo;
import com.ninthgroup.vo.Result;
;

/**
 * @author ：1452863884@qq.com rcg
 * @date ：Created in 2022/10/14 11:06
 * @description：权限接口
 * @modified By：
 * @version: 1.0
 */
public interface PermissionService {

    /**
     * @param
     * @return com.ninthgroup.vo.Result
     * @create by: 1452863884@qq.com rcg
     * @description:查询所有权限
     * @create time: 2022/10/16 21:14
     */
    Result findByAId();


    /**
     * @param roleId
     * @return com.ninthgroup.vo.Result
     * @create by: 1452863884@qq.com rcg
     * @description:通过角色id查询其所有权限
     * @create time: 2022/10/16 21:14
     */
    Result findByRoleId(int roleId);


    /**
     * @param roleId
     * @param permissionIds
     * @return com.ninthgroup.vo.Result
     * @create by: 1452863884@qq.com rcg
     * @description:通过角色id赋值权限
     * @create time: 2022/10/16 21:14
     */
    Result qr(Integer roleId, Integer[] permissionIds);


    /**
     * @param
     * @return com.ninthgroup.vo.Result
     * @create by: 1452863884@qq.com rcg
     * @description:查询所有权限
     * @create time: 2022/10/16 22:28
     */
    Result selectAll(Integer currentPage, Integer pageSize, PermissionVo permissionVo);


    /**
     * @param permission
     * @return com.ninthgroup.vo.Result
     * @create by: 1452863884@qq.com rcg
     * @description:添加权限
     * @create time: 2022/10/17 14:57
     */
    Result insertPermission(Permission permission);


    /**
     * @create by: 1452863884@qq.com rcg
     * @description:修改权限
     * @create time: 2022/10/17 15:52
     * @param permission
     * @return com.ninthgroup.vo.Result
     */
    Result updatePermission(Permission permission);


    /**
     * @create by: 1452863884@qq.com rcg
     * @description:删除权限
     * @create time: 2022/10/17 15:52
     * @param pId
     * @return com.ninthgroup.vo.Result
     */
    Result deletePermission(Integer pId);

}
